package com.ruoyi.informfrontend.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.informfrontend.mapper.CloudClassroomProjectMainMapper;
import com.ruoyi.informfrontend.domain.CloudClassroomProjectMain;
import com.ruoyi.informfrontend.service.ICloudClassroomProjectMainService;

/**
 * 云课堂专辑Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-17
 */
@Service
public class CloudClassroomProjectMainServiceImpl implements ICloudClassroomProjectMainService 
{
    @Autowired
    private CloudClassroomProjectMainMapper cloudClassroomProjectMainMapper;

    /**
     * 查询云课堂专辑
     * 
     * @param id 云课堂专辑主键
     * @return 云课堂专辑
     */
    @Override
    public CloudClassroomProjectMain selectCloudClassroomProjectMainById(Long id)
    {
        return cloudClassroomProjectMainMapper.selectCloudClassroomProjectMainById(id);
    }

    /**
     * 查询云课堂专辑列表
     * 
     * @param cloudClassroomProjectMain 云课堂专辑
     * @return 云课堂专辑
     */
    @Override
    public List<CloudClassroomProjectMain> selectCloudClassroomProjectMainList(CloudClassroomProjectMain cloudClassroomProjectMain)
    {
        return cloudClassroomProjectMainMapper.selectCloudClassroomProjectMainList(cloudClassroomProjectMain);
    }

    /**
     * 新增云课堂专辑
     * 
     * @param cloudClassroomProjectMain 云课堂专辑
     * @return 结果
     */
    @Override
    public int insertCloudClassroomProjectMain(CloudClassroomProjectMain cloudClassroomProjectMain)
    {
        cloudClassroomProjectMain.setCreateTime(DateUtils.getNowDate());
        return cloudClassroomProjectMainMapper.insertCloudClassroomProjectMain(cloudClassroomProjectMain);
    }

    /**
     * 修改云课堂专辑
     * 
     * @param cloudClassroomProjectMain 云课堂专辑
     * @return 结果
     */
    @Override
    public int updateCloudClassroomProjectMain(CloudClassroomProjectMain cloudClassroomProjectMain)
    {
        cloudClassroomProjectMain.setUpdateTime(DateUtils.getNowDate());
        return cloudClassroomProjectMainMapper.updateCloudClassroomProjectMain(cloudClassroomProjectMain);
    }

    /**
     * 批量删除云课堂专辑
     * 
     * @param ids 需要删除的云课堂专辑主键
     * @return 结果
     */
    @Override
    public int deleteCloudClassroomProjectMainByIds(Long[] ids)
    {
        return cloudClassroomProjectMainMapper.deleteCloudClassroomProjectMainByIds(ids);
    }

    /**
     * 删除云课堂专辑信息
     * 
     * @param id 云课堂专辑主键
     * @return 结果
     */
    @Override
    public int deleteCloudClassroomProjectMainById(Long id)
    {
        return cloudClassroomProjectMainMapper.deleteCloudClassroomProjectMainById(id);
    }
}
